"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue = require("vue");
const index = require("../panel/index.cjs");
const index$1 = require("../empty/index.cjs");
const _hoisted_1 = { class: "me-resource-panel-filter-header" };
const _hoisted_2 = { class: "me-resource-panel-filter-header-text" };
const _hoisted_3 = { class: "me-resource-panel-filter-header-total" };
const _hoisted_4 = {
  key: 0,
  class: "me-resource-panel-filter-content"
};
const _hoisted_5 = ["onClick"];
const _hoisted_6 = {
  key: 1,
  class: "me-resource-panel-filter-content"
};
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  __name: "resource-filter-panel",
  props: {
    layer: { default() {
      return {};
    } },
    filterList: { default() {
      return [[]];
    } }
  },
  emits: ["click"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emits = __emit;
    const clickFilter = (filter, layer) => {
      filter.selected = !filter.selected;
      emits("click", filter, layer);
    };
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(vue.unref(index.Panel), { class: "me-resource-panel-filter" }, {
        default: vue.withCtx(() => [
          vue.createVNode(vue.unref(index.PanelTitle), null, {
            default: vue.withCtx(() => [
              vue.createElementVNode("div", _hoisted_1, [
                vue.createElementVNode("span", _hoisted_2, vue.toDisplayString(_ctx.layer.title), 1),
                vue.createElementVNode("span", _hoisted_3, vue.toDisplayString(_ctx.layer.total), 1)
              ])
            ]),
            _: 1
          }),
          vue.createVNode(vue.unref(index.PanelContent), { class: "me-resource-panel-filter-box" }, {
            default: vue.withCtx(() => [
              _ctx.filterList.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
                (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filterList, (list, index2) => {
                  return vue.openBlock(), vue.createElementBlock("div", {
                    class: "me-resource-panel-filter-content-list",
                    key: index2
                  }, [
                    (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list, (item, index22) => {
                      return vue.openBlock(), vue.createElementBlock("span", {
                        onClick: ($event) => clickFilter(item, _ctx.layer),
                        class: vue.normalizeClass(["me-resource-panel-filter-content-list-item", { selected: item.selected }]),
                        key: index22
                      }, vue.toDisplayString(item.name), 11, _hoisted_5);
                    }), 128))
                  ]);
                }), 128))
              ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
                vue.createVNode(vue.unref(index$1.Empty), { description: "暂无数据" })
              ]))
            ]),
            _: 1
          })
        ]),
        _: 1
      });
    };
  }
});
exports.default = _sfc_main;
//# sourceMappingURL=resource-filter-panel.vue2.cjs.map
